<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
    <style>
      /* global */
      @media screen and (min-width: 1300px){
        .container{
          width: 1260px;
        }
      }
      :root{
        --main-color: #429AD9;
      }
      html{
        font-family: sans-serif;
        overflow-x: hidden;
      }
      a, a:hover{
        text-decoration: none;
      }

      /* common */
      .panel_head{
        border-bottom: #eee solid 2px;
        position: relative;
        height: 32px;
      }
      .panel_title{
        position: absolute;
        bottom: -2px;
        border-bottom: var(--main-color) solid 2px;
        line-height: 32px;
        font-size: 18px;
      }
      .artical_list{
        list-style: none;
        padding: 10px 0;        
      }
      .artical_item{
        width: 25%;
        height: 25%;
        float: left;
        padding-right: 6px;
      }
      .artical_item img{
        width: 85%;
        height: 85%;
      }

      /* header start */
      .bg{
        background: #f6f6f6;
      }
      .logo{
        background: var(--main-color);
        width: 100%;
        padding-bottom: 60%;
        position: relative;
        margin: 0;
      }
      .logo .glyphicon-search{
        position: absolute;
        vertical-align: middle;
        right: 0;
        top: 0;
        color: #fff;
        line-height: 42px;
        padding: 0 16px;
      }
      @media screen and (max-width: 768px) {
        #collapseForm{
          padding: 0 16px;
        }
      }
      header{
        padding: 0;
      }
      .logo a{
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .logo small{
        display: block;
        font-size: 16px;
        color: #fff;
        text-align: right;
      }
      .nav{
        border-bottom: #eee solid 1px;
      }
      .nav a{
        color: #666;
      }
      .nav a:focus{
        color: var(--main-color);
      }
      .form-inline{
        margin-top: 16px;
      }
      .input-group-addon{
        padding: 0;
        border: none;
      }
      
      @media screen and (max-width: 767px){
        .logo{
          padding-bottom: 0;
          line-height: 43px;
          height: 43px;
          font-size: 18px;
        }
        .nav{
          display: flex;
        }
        .nav a:focus{
          border-bottom: var(--main-color) solid 2px;
        }
        .container{
          padding: 0;
        }
      }
      /* header end */

      /* content start */
      .banner{
        list-style: none;
        height: 276px;
        padding: 0;
        margin: 15px -15px;
      }
      @media screen and (max-width: 767px) {
        .banner{
          margin: 15px 0;
        }
      }
      .banner .item{
        position: relative;
        float: left;
        width: 25%;
        height: 50%;
        padding: 0 10px 10px 0;
        cursor: pointer;
      }
      .banner .item a,.banner .item img{
        width: 100%;
        height: 100%;
      }
      .banner .item span{
        position: absolute;
        bottom: 10px;
        left: 0;
        right: 10px;
        color: #fff;
        height: 42px;
        padding: 6px 10px;
        font-size:12px;
        background: rgba(0, 0, 0, .5);
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
      }
      .banner .item span:hover{
        background: var(--main-color);
      }
      .banner .item:nth-child(1){
        width: 50%;
        height: 100%;
      }
      .banner .item:nth-child(1) span{
        line-height: 42px;
        font-size: 16px;
        padding: 0 10px;
      }
      /* content end */

      /* footer start */
      .ad_img{
        width: 100%;
        margin-top: 15px;
      }
      .ad_link{
        margin-top: 15px;
        display: block;
        padding: 0 10px;
        box-sizing: border-box;
        border: #eaeaea solid 1px;
      }
      .ad_link:hover{
        border-color: var(--main-color);
      }
      .ad_link strong{
        display: inline-block;
        padding: 6px 12px;
        color: #fff;
        background: var(--main-color);
      }
      /* footer end */

    </style>
  </head>
  <body>
    <div class="container">
      <div class="row">
        <header class="col-lg-2 col-md-4 col-sm-4">
          <h2 class="logo">
            <a href="#">
              <span>阿里百秀<small class="hidden-xs">alibaixiu.cn</small></span>              
            </a>
            <span class="glyphicon glyphicon-search visible-xs">
            </span>
          </h2>
          <ul class="nav bg">
            <li>
              <a href="#" focus>
                <span class="glyphicon glyphicon-camera hidden-xs"></span>
                生活馆
              </a>
            </li>
            <li>
              <a href="#">
                <span class="glyphicon glyphicon-camera hidden-xs"></span>
                自然汇
              </a>
            </li>
            <li>
              <a href="#">
                <span class="glyphicon glyphicon-camera hidden-xs"></span>
                科技潮
              </a>
            </li>
            <li>
              <a href="#">
                <span class="glyphicon glyphicon-camera hidden-xs"></span>
                奇趣事
              </a>
            </li>
            <li>
              <a href="#">
                <span class="glyphicon glyphicon-camera hidden-xs"></span>
                美食杰
              </a>
            </li>
          </ul>
          <form class="form-inline bg" id="collapseForm">
            <div class="form-group">
              <div class="input-group">
                <input type="text" class="form-control" id="exampleInputAmount" placeholder="输入关键字">
                <div class="input-group-addon">
                  <button type="submit" class="btn btn-primary">搜索</button>
                </div>
              </div>
            </div>            
          </form>
        </header>
        <div class="col-lg-7 col-md-8 col-sm-8">
          <ul class="banner">
            <li class="item">
              <a href="#">
                <img src="./images/thumbnail.png" alt="" srcset="">
              </a>
              <span>阿里百秀</span>
            </li>
            <li class="item">
              <a href="#">
                <img src="./images/1.jpg" alt="" srcset="">
              </a>
              <span>奇了&nbsp;成都一小区护卫长得像马云&nbsp;市民纷纷求合影</span>
            </li>
            <li class="item">
              <a href="#">
                <img src="./images/2.jpg" alt="" srcset="">
              </a>
              <span>世界真美&nbsp;令人惊叹&nbsp;卫星拍地球风景地貌</span>
            </li>
            <li class="item">
              <a href="#">
                <img src="./images/3.jpeg" alt="" srcset="">
              </a>
              <span>震惊！巨型蜈蚣遭毒蛇吞噬&nbsp;穿肚而出同归于尽</span>
            </li>
            <li class="item">
              <img src="./images/4.jpeg" alt="" srcset="">
              <span>关于指甲的10个健康知识&nbsp;你知道几个？</span>
            </li>
          </ul>
          <div class="panel_head">
            <span class="panel_title">一周热门排行</span>
          </div>
          <ul class="artical_list">
            <li class="artical_item">
              <img src="./images/1.jpg" alt="" srcset="">
              <p>奇了&nbsp;成都一小区护卫长得像马云&nbsp;市民纷纷求合影</p>
            </li>
            <li class="artical_item">
              <img src="./images/2.jpg" alt="" srcset="">
              <p>世界真美&nbsp;令人惊叹&nbsp;卫星拍地球风景地貌</p>
            </li>
            <li class="artical_item">
              <img src="./images/3.jpeg" alt="" srcset="">
              <p>震惊！巨型蜈蚣遭毒蛇吞噬&nbsp;穿肚而出同归于尽</p>
            </li>
            <li class="artical_item">
              <img src="./images/4.jpeg" alt="" srcset="">
              <p>关于指甲的10个健康知识&nbsp;你知道几个？</p>
            </li>
          </ul>
        </div>
        <div class="col-lg-3 visible-lg">
          <img src="./images/zgboke.jpg" alt="" srcset="" class="ad_img">
          <a href="#" class="ad_link">
            <strong>热搜</strong>
            <h3>欢迎加入中国博客联盟</h3>
            <p>这里收录国内各个领域的优秀博客，是一个全人工编辑的开放式博客联盟交流和展示平台......</p>
          </a>
        </div>
      </div>
    </div>

    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <script>
      function observeWindowResize() {
        if($(window).width() < 768){
          $('#collapseForm').hide();
        }
        else{          
          $('#collapseForm').show();
        }
      }
      observeWindowResize();
      $(window).on('resize', observeWindowResize)
      $('.glyphicon-search').click(function(){
        $('#collapseForm').slideToggle();
      })
    </script>
  </body>
</html>